home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / mod2tutr.zip / TABCONT.TXT < prev   
Text File  |  1989-01-18  |  9KB  |  199 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                      CORONADO ENTERPRISES
  11.  
  12.                  MODULA-2 TUTOR - Version 2.0
  13.  
  14. This documentation and the accompanying software, including all
  15. of the example Modula-2 programs and text files, are protected
  16. under United States copyright law to protect them from unauth-
  17. orized commercialization.  This version of the tutorial is dis-
  18. tributed under the shareware concept, which means you are not
  19. required to pay for it.  You are permitted to copy the disks,
  20. and pass the copies on to a friend, provided that you do not
  21. modify any files or omit any files from the complete package,
  22. and you are in fact encouraged to pass on complete copies to
  23. friends.  You are permitted to charge a small fee to cover the
  24. costs of duplication, but you are not permitted to charge any-
  25. thing for the software itself.
  26.  
  27. If you find the tutorial helpful, you are encouraged to register
  28. with the author and to submit a small fee to help compensate him
  29. for his time and expense in writing it.  We will provide you
  30. with a beautifully printed copy of this tutorial if you submit a
  31. full registration.  See the READ.ME file on either diskette for
  32. additional details.
  33.  
  34. Whether or not you send a registration fee, feel free to request
  35. a copy of the latest list of available tutorials and a list of
  36. the authorized Public Domain libraries that distribute our full
  37. line of programming language tutorials.
  38.  
  39.  
  40.                Gordon Dodrill - Jan 18, 1989
  41.  
  42.  
  43.  
  44.          Copyright (c) 1989, Coronado Enterprises
  45.  
  46.  
  47.                   Coronado Enterprises
  48.                   12501 Coronado Ave NE
  49.               Albuquerque, New Mexico 87122
  50.  
  51.  
  52.                MODULA-2 TUTORIAL - TABLE OF CONTENTS
  53.  
  54. Introduction to the Modula-2 tutorial                Page I-1
  55.      FIRSTEX.MOD      The first example program        I-5
  56.  
  57.                  Part I - Modula-2 is like Pascal
  58.  
  59. Chapter 1 - What is a computer program?              Page 1-1
  60.  
  61. Chapter 2 - Getting started in Modula-2              Page 2-1
  62.      PUPPYDOG.MOD     The minimum Modula-2 program     2-1
  63.      WRITESM.MOD      Write something on the monitor   2-3
  64.      MODCOMS.MOD      Modula-2 comments                2-4
  65.      GOODFORM.MOD     Good formatting example          2-5
  66.      UGLYFORM.MOD     Ugly formatting example          2-5
  67.  
  68. Chapter 3 - The simple Modula-2 data types           Page 3-1
  69.      INTVAR.MOD       Integer variables                3-2
  70.      INTMATH.MOD      Integer variable math examples   3-4
  71.      CARDMATH.MOD     Cardinal variable math examples  3-6
  72.      REALMATH.MOD     Real variable math example       3-7
  73.      REALTRIG.MOD     Trigonometric example            3-8
  74.      BOOLMATH.MOD     Boolean variable math example    3-9
  75.      CHARDEMO.MOD     Character variable demonstration 3-10
  76.      TRANSFER.MOD     Transfer between types           3-12
  77.  
  78. Chapter 4 - Modula-2 loops and control structures    Page 4-1
  79.      LOOPDEMO.MOD     Loop demonstration               4-1
  80.      IFDEMO.MOD       Conditional branching            4-5
  81.      LOOPIF.MOD       Loops and IF's together          4-6
  82.      TEMPCONV.MOD     Temperature conversion           4-6
  83.      DUMBCONV.MOD     Poor variable names              4-7
  84.      CASEDEMO.MOD     CASE demonstration               4-7
  85.      BIGCASE.MOD      Bigger case example              4-8
  86.  
  87. Chapter 5 - Modula-2 procedures                      Page 5-1
  88.      PROCED1.MOD      Simple procedures                5-2
  89.      PROCED2.MOD      Procedures with variables        5-3
  90.      PROCED3.MOD      Multiple variables               5-6
  91.      PROCED4.MOD      Scope of variables               5-6
  92.      PROCED5.MOD      Procedure calling procedures     5-7
  93.      FUNCTION.MOD     An example function              5-7
  94.      RECURSON.MOD     An example with recursion        5-8
  95.  
  96. Chapter 6 - Arrays, types, constants, and labels     Page 6-1
  97.      ARRAYS.MOD       Simple arrays                    6-1
  98.      ARRAYS2.MOD      Multiple arrays                  6-2
  99.      TYPES.MOD        Example of types                 6-3
  100.      CONSTANT.MOD     Example of constants             6-5
  101.      ARAYPASS.MOD     Pass Array to Procedure          6-6
  102.      STRINGEX.MOD     String Handling Examples         6-7
  103.  
  104. Chapter 7 - Overall Program Construction             Page 7-1
  105.      OVERPROG.MOD     Overall Program Construction     7-1
  106.      MOREPROG.MOD     More Program Construction        7-2
  107.      LASTPROG.MOD     Scrambled Order of Definitions   7-3
  108.  
  109. Chapter 8 - Input/Output and Printing                Page 8-1
  110.      SIMPLOUT.MOD     Simple Monitor Output            8-1
  111.      SIMPLIN.MOD      Simple Keyboard Input            8-3
  112.      FILEIO.MOD       File I/O with InOut              8-5
  113.      VARYFILE.MOD     Variable Filename Input          8-7
  114.      PRINTFLE.MOD     Printer and File Output          8-9
  115.  
  116. Chapter 9 - Example Programs                         Page 9-1
  117.      TIMEDATE.MOD     Time and Date Example            9-1
  118.      AREAS.MOD        Calculate Areas                  9-1
  119.      PC.MOD           Printer Control                  9-2
  120.      LIST.MOD         List Program File                9-2
  121.  
  122.                  Part II - Advanced Topics
  123.  
  124. Chapter 10 - Scalars, subranges, and sets            Page 10-1
  125.      ENTYPES.MOD      Enumerated Types                 10-1
  126.      SUBRANGE.MOD     Subranges                        10-3
  127.      SETS.MOD         A SET example                    10-5
  128.  
  129. Chapter 11 - Records in Modula-2                     Page 11-1
  130.      SMALLREC.MOD     A Small Record Example           11-1
  131.      BIGREC.MOD       A Larger Record Example          11-2
  132.      VARREC.MOD       A Variant Record Example         11-5
  133.  
  134. Chapter 12 - Pointers and Dynamic Allocation         Page 12-1
  135.      POINTERS.MOD     Pointer Example                  12-1
  136.      DYNREC.MOD       A Dynamically Allocated Record   12-4
  137.      LINKLIST.MOD     A linked List                    12-6
  138.  
  139.  
  140.  
  141.               Part III - Modula-2 extends Pascal
  142.  
  143. Chapter 13 - Modules, Local and Global               Page 13-1
  144.      LOCMOD1.MOD      Local Module Demonstration       13-1
  145.      LOCMOD2.MOD      Local Module Demonstration       13-4
  146.      CIRCLES.DEF      Global Module - Definition       13-5
  147.      CIRCLES.MOD      Global Module - Implementation   13-6
  148.      GARDEN.MOD       Calls Module "MYCALCUL"          13-9
  149.      GARDEN2.MOD      Calls Module "MYCALCUL"          13-9
  150.      OPAQUETY.DEF     Opaque type definition           13-10
  151.      OPAQUETY.MOD     Opaque type implementation       13-10
  152.      OPTYPE.MOD       Use opaque type                  13-11
  153.      PROCTYPE.MOD     Procedure Type Example           13-11
  154.  
  155. Chapter 14 - Machine Dependent Facilities            Page 14-1
  156.      TYPEREL.MOD      Type relaxation                  14-1
  157.      WORDADDR.MOD     WORD and ADDRESS example         14-3
  158.      ADRSTUFF.MOD     Address manipulation             14-4
  159.  
  160.  
  161. Chapter 15 - Concurrency in Modula-2                 Page 15-1
  162.      COROUT.MOD       A Simple Coroutine               15-2
  163.      COROUT2.MOD      Added Features                   15-4
  164.      COROUT3.MOD      Triple Coroutines                15-5
  165.      RANPROC.MOD      Random processes                 15-5
  166.      INFINITE.MOD     Infinite Execution Loop          15-6
  167.  
  168. Chapter 16 - Complete example programs               Page 16-1
  169.      BAKLIST.MOD      Get All filenames From Disk      16-1
  170.      BAKCOPY.MOD      Copy files from Fixed to Floppy  16-2
  171.      BAKRSTR.MOD      Read Floppy back to Fixed Disk   16-2
  172.      DIRHELPS.DEF     Directory help procedures        16-3
  173.      DIRHELPS.MOD                                      16-3
  174.      BITOPS.DEF       Bit Level Operations             16-3
  175.      BITOPS.MOD                                        16-3
  176.      REAL2MON.DEF     Real outputs to the monitor      16-3
  177.      REAL2MON.MOD                                      16-3
  178.      REAL2FIL.DEF     Real outputs to a file           16-3
  179.      REAL2FIL.MOD                                      16-3
  180.  
  181.  
  182.  
  183. ABOUT THE AUTHOR
  184. _________________________________________________________________
  185.  
  186. The author of this tutorial began programming in 1961 using FORTRAN
  187. on an IBM 1620.  Since then most of his career has been involved
  188. with designing digital logic for satellite application.  In 1983,
  189. being somewhat burned out with logic design, he began a study of
  190. some of the more modern programming languages and has since made
  191. a complete career shift to software development.  After learning
  192. Pascal, C was studied, followed by Modula-2 and Ada.  Rather than
  193. simply learning the syntax of each new language, modern methods of
  194. software engineering were studied and applied to effectively
  195. utilize the languages.  He is currently employed by a large
  196. research and development laboratory where he continues to study,
  197. teach, and apply the newer programming languages.
  198.  
  199.